package com.basker.pisces.core.meta.bean;

import com.basker.pisces.core.meta.DataObjectField;
import com.basker.pisces.core.meta.IDataObjectMeta;

public class BeanDataObjectField extends DataObjectField {
    private BeanFieldDescriptor beanFieldDescriptor;

    protected BeanDataObjectField(BeanFieldDescriptor beanFieldDescriptor, String name, String displayName,
                                  IDataObjectMeta objectMeta) {
        super(name, displayName, objectMeta);
        this.beanFieldDescriptor = beanFieldDescriptor;
    }

    @Override
    public Object getValue(Object dataObject) {
        return this.beanFieldDescriptor.getValue(dataObject);
    }

    @Override
    public void setValue(Object dataObject, Object value) {
        this.beanFieldDescriptor.setValue(dataObject, value);
    }

}
